<?php
namespace Core;

require_once __Dir__ . '/../../simpletest/autorun.php';

class TestOfAddUser extends \UnitTestCase 
{
	/**
	* Check a correct get users
	*
	* @reference
	*
	* @requirement
	* @requirement
	*/
    function testCorrectAddUser() 
	{
		$services = new CoreService();
		$result = $services->addUser("Christophe", "Durand", "", "c.durand@gmail.com", "06.48.30.54.21", "", "1");
		
		$this->assertFalse($result->isFailed);
		$this->assertTrue(isset($result->response));
    }

	/**
	* Check an invalid get users
	*/
    function testInvalidAddUser() 
	{
		$services = new CoreService();
		$result = $services->addNewUser("toto", "titi", "c.durand@gmail.com");
		
		$this->assertTrue($result->isFailed);
    }
}
?>